<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="fr">
<head>
	<title>Gestion du menu et des batteries | Pictolemmes</title>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<link rel="shortcut icon" type="image/x-icon" href="favicon.ico">
	
	<!--[if lte IE 7]> 
		<script type="text/javascript">
			// ie7
			$(document).ready(function() {
				$('body').addClass("ie7");
			});
		</script>
	<![endif]-->
	
	<!-- CSS -->
	<link rel="stylesheet" href="css/pictolemmes.css?rev=$$version" type="text/css">
	<link rel="stylesheet" type="text/css" media="screen" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.7/themes/sunny/jquery-ui.css" />
</head>
<body class="lsbm saisie">
	<div class="content">
	
		<div class="globalActions top">
			<div class="buttonContainer">
				<button class="back" onclick="back()">Retour</button>
				<button class="new" onclick="loadPanel('new-batterie');">Nouveau</button>
				<button class="csv" onclick="toggleCsvForm()">Charger plusieurs questions</button>
				<button class="refresh" onclick="refreshBat()">Rafraichir</button>
				<button class="delete" onclick="deleteBat()">Supprimer</button>
			</div>
			<div class="titleContainer">
				<div class="productName"><img src="css/images/logo_pictolemmes.png?rev=$$version" height="25" alt="Pictolemmes"></img></div>
				<div class="disconnectArea"><a href="#" onclick="logout();return false;">Déconnexion</a></div>
			</div>
		</div>
	
		<div class="contentContainer">
			<div class="container hidden menuContainer">
				<div class="subContainer">
					<ul class="menu admin floatContainer">
						<li class="menuItem buttonMenu menu"><a href="#" onclick="loadPanel('menus');return false;">Gestion du Menu</a></li>
						<li class="menuItem buttonMenu saisie"><a href="#" onclick="loadPanel('batteries');return false;">Gestion des Batteries</a></li>
					</ul>
				</div>
			</div>
		
			<div class="container hidden batteriesManagement">
				<h1>Sélectionnez la batterie que vous souhaitez éditer.</h1>
				<ul class="menu floatContainer batteries textListContainer">
				</ul>
			</div>
		
			<div class="container hidden batterieForm">
				<form class="modifyImage hidden" target="upload_target" enctype="multipart/form-data" method="post">
					<div class="field">
						<input id="modifyImageId" type="hidden" name="exercice_id" value="">		
						<input id="modifyImageRowId" type="hidden" name="row_id" value="">		
						<input id="modifyImageFile" type="file" name="imagefile" class="file">
					</div>
				</form>
				<form class="modifyAudio hidden" target="upload_target" enctype="multipart/form-data" method="post">
					<div class="field">
						<input id="modifyAudioId" type="hidden" name="exercice_id" value="">		
						<input id="modifyAudioRowId" type="hidden" name="row_id" value="">		
						<input id="modifyAudioFile" type="file" name="audiofile" class="file">
					</div>
				</form>
				<form class="cvsForm hidden" target="upload_target" enctype="multipart/form-data" method="post">
					<div class="field">
						<input type="hidden" name="batterie_id" value="">		
						<input type="file" name="csvfile" class="file">		
						<input type="submit" value="Enregistrer" class="inputButton">
						<a class="help" href="#" onclick="displayCsvHelp();return false;">Comment ça marche ?</a>
					</div>
				</form>
				<form id="mainData" class="mainData">
					<input type="hidden" name="batterie_id" value="">		
					<div class="floatContainer mainDataContainer">
						<div class="fieldContainer">
							<div class="field">
								<label for="nom">Nom</label>
								<input class="text" id="nom" name="nom">
							</div>
							<div class="field">
								<label for="visibility_id">Visibilité</label>
								<select id="visibility_id" name="visibilityId">
									<option value="2">Privée</option>
									<option value="0">Utilisation publique</option>
									<option value="1">Modification publique</option>
								</select>
							</div>
							<div class="field">
								<label for="pagePerSerie">Nombre de pages par série</label>
								<select id="pagePerSerie" class="numList" name="pagePerSerie">
								</select>
							</div>
							<div class="field">
								<label for="questionPerPage">Nombre de questions par page</label>
								<select id="questionPerPage" class="numList" name="questionPerPage">
								</select>
							</div>
						</div>
						<div class="fieldContainer">
							<div class="field">
								<label for="description">Description</label>
								<input class="text" id="description" name="description">
							</div>
							<div class="field cb">
								<label for="numero_enabled">Réponse par numéro autorisée</label>
								<input id="numero_enabled" name="numero_enabled" type="checkbox" value="1" class="checkbox">
							</div>
							<div class="field cb">
								<label for="dictee_enabled">Réponse entière autorisée</label>
								<input id="dictee_enabled" name="dictee_enabled" type="checkbox" value="1" class="checkbox">
							</div>
							<div class="field cb">
								<label for="default_tempo">Tempo activée par défaut</label>
								<input id="default_tempo" name="default_tempo" type="checkbox" value="1" class="checkbox">
							</div>
							<div class="field submitField">
								<input type="submit" class="numList inputButton" value="Enregistrer" title="Enregistrer les modifications">
							</div>
						</div>
					</div>
				</form>
				<div class="actionsOnExercices">
					<button onclick='deleteExercices(event)' title="Supprimer les exercices sélectionnés">Supprimer les exercices sélectionnés</button>
				</div>
				<div class="exercices">
				    <table id='exerciceGrid'></table>
				</div>
			    <form id="newExercice" class="newExercice floatContainer">
					<input type="hidden" name="batterie_id">
					<div class="field">
						<input class="inputButton" type="submit" value="Ajouter">
					</div>
					<div class="field inp">
						<div>
							<label for="new_reponse_complete">Réponse complète</label>
							<input id="new_reponse_complete" name="reponse_complete">
						</div>
						<div class="info">Idem à description si vide</div>
					</div>
					<div class="field inp">
						<div>
							<label for="new_question">Question</label>
							<input id="new_question" name="question">
						</div>
						<div class="info">Idem à description si vide</div>
					</div>
					<div class="field inp">
						<div>
							<label for="new_description">Description</label>
							<input id="new_description" name="description">
						</div>
					</div>
			    </form>
			</div>
			
			<div class="container hidden newBatterieForm">
				<form class="optionsForm">
					<h2>Modèle de batterie</h2>
					<div class="field">
					   <input type="radio" class="fillType" name="fillType" onchange="selectFillType();" value="list" id="filltype_list"></option><label for="filltype_list">Liste unique</label> 
					   <input type="radio" class="fillType" name="fillType" onchange="selectFillType();" value="classic" id="filltype_classic"></option><label for="filltype_classic">Classique</label>
					   <input type="radio" class="fillType" name="fillType" onchange="selectFillType();" value="custom" id="filltype_custom"></option><label for="filltype_custom">Personnalisé</label> 
					</div>
				</form>
				<form class="dataForm">
					<div class="field">
						<label for="bat_pagePerSerie">Nombre de pages par série</label>
						<select id="bat_pagePerSerie" class="numList" name="pagePerSerie">
						</select>
					</div>
					<div class="field">
						<label for="bat_questionPerPage">Nombre de questions par page</label>
						<select id="bat_questionPerPage" class="numList" name="questionPerPage">
						</select>
					</div>
					<h2>Informations principales</h2>
					<div class="floatContainer mainDataContainer">
						<div class="fieldContainer">
							<div class="field">
								<label for="bat_nom">Nom</label>
								<input id="bat_nom" name="nom">
							</div>
							<div class="field">
								<label for="bat_description">Description</label>
								<input id="bat_description" name="description">
							</div>
							<div class="field">
								<label for="visibility_id">Visibilité</label>
								<select id="visibility_id" name="visibilityId">
									<option value="2">Privée</option>
									<option value="0">Utilisation publique</option>
									<option value="1">Modification publique</option>
								</select>
							</div>
						</div>
						<h2>Options</h2>
						<div class="fieldContainer">
							<div class="field">
								<label for="bat_numero_enabled">Réponse par numéro autorisée</label>
								<input id="bat_numero_enabled" name="numero_enabled" type="checkbox" value="1" class="checkbox">
							</div>
							<div class="field">
								<label for="bat_dictee_enabled">Réponse entière autorisée</label>
								<input id="bat_dictee_enabled" name="dictee_enabled" type="checkbox" value="1" class="checkbox">
							</div>
							<div class="field">
								<label for="bat_default_tempo">Tempo activée par défaut</label>
								<input id="bat_default_tempo" name="default_tempo" type="checkbox" value="1" class="checkbox">
							</div>
						</div>
					</div>
					<div class="field action">
						<input type="submit" class="inputButton" onclick="submitNewBatterie();return false;" value="Créer">
					</div>
				</form>
			</div>
			
			
			<div class="container hidden menuManagement">
				<div class="menuChosePublic floatContainer">
					<button class="" onclick="selectPublicMenu();return false;" value="public">Choix du menu</button>
					<button class="" onclick="selectPrivateMenu();return false;" value="private">Personnaliser mon menu</button>
				</div>
				<div class="menus public">
					<ul class="data textListContainer"></ul>
				</div>
				<div class="menus private">
					<div class="floatContainer data">
						<div class="privateMenu">
							<div class="notYet hidden">Votre menu personnalisé n'est pas encore créé, cliquez sur le bouton ci-dessous pour commencer.</div>
						    <table id='privateGrid'></table>
						</div>
					    <form class="batterieSelectionForm hidden">
						    <h2 class="title"></h2>
						    <input type="hidden" name="subMenuId">
						    <ul class="batterieSelectionContainer"></ul>
						    <div class="actions">
							    <input type="submit" class="inputButton" value="Valider">
						    </div>
					    </form>
					</div>
					<div class="resetContainer">
						<button class="createMyMenu hidden" onclick="resetMyMenu()">Créer mon menu</button>
						<button class="resetMyMenu" onclick="resetMyMenu()">Remettre mon menu à zéro</button>
					</div>
				</div>
			</div>
		</div>
		
	</div>
	
	<iframe id="upload_target" name="upload_target" src="_blank.html" style="width:0;height:0;border:0px solid #fff;"></iframe> 
	

<!-- JS -->
<script type="text/javascript" src="js/saisie/pictolemmes.js?rev=$$version"></script>
<!-- JS DEV -->
<script type="text/javascript" src="js/lib/jquery-1.8.2.js"></script>
<script type="text/javascript" src="js/lib/jquery.ThreeDots.modified.js"></script>
<script type="text/javascript" src="js/lib/grid.locale-fr.js"></script>
<script type="text/javascript" src="js/lib/jquery.jqGrid.min.js"></script>
<script type="text/javascript" src="js/common/conf.js"></script>
<script type="text/javascript" src="js/common/tools.js"></script>
<script type="text/javascript" src="js/common/common.js"></script>
<script type="text/javascript" src="js/saisie/saisie.js"></script>
<script type="text/javascript" src="js/saisie/batteriesManagement.js"></script>
<script type="text/javascript" src="js/saisie/batterieForm.js"></script>
<script type="text/javascript" src="js/saisie/newBatterieForm.js"></script>
<script type="text/javascript" src="js/saisie/menuManagement.js"></script>
<!-- JSEND DEV -->
</body>
</html>
